home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-05-01 | 7.1 KB | 264 lines | [TEXT/MPS ] |
- /*
- File: HILists.idl
-
- Contains: Interfaces to one-dimensional item layout objects: lists, multiple selection lists, and menus
-
- Version: Technology: System 8.0
- Release: Universal Interfaces 3.0d3 on Copland DR1
-
- Copyright: © 1995-1996 by Apple Computer, Inc. All rights reserved.
-
- Bugs?: If you find a problem with this file, send the file and version
- information (from above) and the problem description to:
-
- Internet: apple.bugs@applelink.apple.com
- AppleLink: APPLE.BUGS
- */
-
-
- #ifndef __HILISTS_IDL__
- #define __HILISTS_IDL__
-
- #include <HIPanels.idl>
- #include <HIImagingObjects.idl>
- #include <HIItemStorage.idl>
- #include <HIListTypes.idl>
-
-
- interface HIAbstractList : HIPanel
- {
- // ======================================================
- // Public Methods
- // ======================================================
-
-
- OSStatus InitAbstractList( in RefLabel identifier,
- in HIWindow window,
- in Rect bounds );
-
-
-
- OSStatus AddItems( in HIItemIndex index, in UInt32 numItems );
- // Adds empty rows to lists/menus
- OSStatus DeleteItem( in HIItemIndex index );
- // Deletes the specified row from a list/menu; Also deletes the item data if any
-
-
- OSStatus SetItemImage( in HIItemIndex index, in ConstHIImageRef imageRef,
- in HIAdoptionFlags imageAdoptionFlags);
- OSStatus GetItemImage( in HIItemIndex index, out HIImageRef imageRefPtr );
-
-
-
- OSStatus SetItemMark( in HIItemIndex index, in UInt16 markChar );
- UInt16 GetItemMark( in HIItemIndex index );
-
-
- OSStatus SetItemIcon( in HIItemIndex index, in Handle iconSuite );
- Handle GetItemIcon( in HIItemIndex index );
-
-
-
- OSStatus SetItemChild( in HIItemIndex index, in HIAbstractList child );
- OSStatus GetItemChild( in HIItemIndex index, out HIAbstractList child );
-
-
-
- OSStatus SetItemEnabledState( in HIItemIndex index, in HIItemState enableState );
- // Enables/disables an item or any of its decorations (mark, icon, etc.).
- // New for lists. It wasn't really possible to disable list items without
- // writing your own LDEF.
- HIItemState GetItemEnabledState( in HIItemIndex index );
-
-
-
- OSStatus SetItemAttributes( in HIItemIndex index, in HIItemAttributes attributes );
- HIItemAttributes GetItemAttributes( in HIItemIndex index );
-
-
- OSStatus SetItemRefLabel( in HIItemIndex index, in RefLabel identifier );
- OSStatus GetItemRefLabel( in HIItemIndex index, out RefLabel identifier );
-
-
- UInt32 GetItemCount();
- // Returns the number of rows in a list/menu
-
-
-
-
-
- void SelectItem( in HIItemIndex index );
- void DeselectItem( in HIItemIndex index );
- // Useful for single selection panels only like radio button groups, pop-up menus, single-selection lists, etc.
- HIItemIndex GetSelectedItem();
- // Useful for single selection panels only like radio button groups, pop-up menus, single-selection lists, etc.
-
-
-
- OSStatus AddItemCollectionItem( in HIItemIndex index, in CollectionTag tag,
- in UInt32 dataSize, in void *data );
- // For developer use exclusively. List/Menu panels completely ignore the contents of collection items;
- // These methods are just pass-throughs to the Collection Manager.
-
- OSStatus GetItemCollectionItemData( in HIItemIndex index, in CollectionTag tag,
- in UInt32 dataSizeIn, out UInt32 dataSizeOut, in void *data );
-
- OSStatus RemoveItemCollectionItem( in HIItemIndex index, in CollectionTag tag );
-
-
-
-
- #ifdef __SOMIDL__
- implementation
- {
-
- passthru C_h = "#include <HIImagingObjects.h>"
- "#include <HIListTypes.h>";
- passthru C_xh = "#include <HIImagingObjects.xh>"
- "#include <HIListTypes.h>";
-
- releaseorder: InitAbstractList,
- AddItems,
- DeleteItem,
- SetItemImage,
- GetItemImage,
- SetItemMark,
- GetItemMark,
- SetItemIcon,
- GetItemIcon,
- SetItemChild,
- GetItemChild,
- SetItemEnabledState,
- GetItemEnabledState,
- SetItemAttributes,
- GetItemAttributes,
- SetItemRefLabel,
- GetItemRefLabel,
- GetItemCount,
- GetItemRect,
- HitTest,
- SelectItem,
- DeselectItem,
- GetSelectedItem,
- AddItemCollectionItem,
- GetItemCollectionItemData,
- RemoveItemCollectionItem,
- reserved0;
- };
- #endif
- };
-
-
- interface HIList : HIAbstractList
- {
- // ======================================================
- // Public Methods
- // ======================================================
-
- OSStatus InitList( in RefLabel identifier,
- in HIWindow window,
- in Rect bounds,
- in HIItemStorage itemStorage );
-
-
-
- implementation
- {
- passthru C_h = "#include <HIItemStorage.h>";
- passthru C_xh = "#include <HIItemStorage.xh>";
-
-
- releaseorder: InitList;
- };
- };
-
- interface HIMultipleSelectionList : HIList
- {
- OSStatus InitMultipleSelectionList( in RefLabel identifier,
- in HIWindow window,
- in Rect bounds,
- in HIItemStorage itemStorage );
-
-
-
- OSStatus SetItemSelectedState( in HIItemIndex index, in HIItemState selectedState );
- HIItemState GetItemSelectedState( in HIItemIndex index );
-
-
- OSStatus GetSelectedItems( in UInt32 requestedCount, out UInt32 actualCount,
- inout HIItemIndex indexArray );
-
-
-
- implementation
- {
-
- releaseorder: InitMultipleSelectionList,
- SetItemSelectedState,
- GetItemSelectedState,
- GetSelectedItems;
- };
- };
-
-
- interface HIMenu : HIAbstractList
- {
- // ======================================================
- // Public Methods
- // ======================================================
-
- OSStatus InitMenu( in RefLabel identifier );
-
-
- OSStatus SetItemAccelerator( in HIItemIndex index, in UInt16 modifiers, in UInt16 accelerator );
- OSStatus GetItemAccelerator( in HIItemIndex index, out UInt16 modifiers, out UInt16 accelerator );
-
-
- OSStatus SetItemAppleEvent( in HIItemIndex index, in AppleEvent theEvent );
- OSStatus GetItemAppleEvent( in HIItemIndex index, out AppleEvent theEvent );
-
-
- OSStatus SetNextMenu( in HIMenu nextMenu );
- // For attaching one menu to another so they act like a single menu.
- OSStatus GetNextMenu( out HIMenu nextMenu );
-
-
-
- // ======================================================
- // Procedural calls
- // These are not object methods, but rather static functions
- // ======================================================
-
- void SetRootHIMenu( in HIMenu rootMenuPanel );
- HIMenu GetRootHIMenu();
-
- void SetMenuFlashCount( in UInt32 count );
- UInt32 GetMenuFlashCount();
-
-
- implementation
- {
-
- SetRootHIMenu: procedure, noself;
- GetRootHIMenu: procedure, noself;
- SetMenuFlashCount: procedure, noself;
- GetMenuFlashCount: procedure, noself;
-
- releaseorder: InitMenu,
- SetItemAccelerator,
- GetItemAccelerator,
- SetItemAppleEvent,
- GetItemAppleEvent,
- SetNextMenu,
- GetNextMenu,
- GetMenuRef,
- PopDown,
- SetRootHIMenu,
- GetRootHIMenu,
- SetMenuFlashCount,
- GetMenuFlashCount;
- };
- };
-
- #endif
-